package com.htc.android.footprints.activity;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.text.Editable;
import android.text.InputFilter;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Filter;
import android.widget.ImageView;
import android.widget.ResourceCursorAdapter;
import android.widget.SectionIndexer;
import android.widget.TextView;

import com.htc.android.footprints.provider.FootprintManager;
import com.htc.android.footprints.utils.FootprintUtils;
import com.htc.android.footprints.utils.ImeLauncher;
import com.htc.android.footprints.utils.clearCachedRunnable;
import com.htc.android.footprints.utils.camera.FootprintImageManager;
import com.htc.android.footprints.vo.Category;
import com.htc.android.footprints.vo.Footprint;

public class DeleteFootprintsActivity extends Activity
{
  private static final int DELETE_ALL_DIALOG = 3;
  private static final int DELETE_DIALOG = 2;
  private static final int MENU_DELETE_ALL = 2;
  private static final int MENU_SORT = 1;
  private static final int MENU_VIEW = 0;
  private static final int SORT_BY_DATE = 1;
  private static final int SORT_BY_NAME = 0;
  private static final int SORT_DIALOG = 1;
  private static final String TAG = "DeleteFootprintsActivity";
  private static final int VIEW_DIALOG;
  protected ListModeAdapter mAdapter;
  private String mCacheTag;
  protected Button mCancelButton;
  private int mCategoryIndex;
  private String mCategoryKeyword;
  private ArrayList<Category> mCategoryList;
  private String[] mCategoryNames;
  protected Cursor mCursor;
  protected Button mDoneButton;
  protected TextView mEmptyText;
  protected View mEmptyView;
  protected Filter mFilter;
  protected FootprintManager mFootprintManager;
  protected HtcListView mListView;
  protected SearchBoxView mSearchBox;
  protected EditText mSearchEdit;
  private ArrayList<Footprint> mSelectedFootprints;
  private int mSortMode;
  private String mSortString;
  protected View mTitleField;

  private void clearCheckState()
  {
    SparseBooleanArray localSparseBooleanArray = this.mListView.getCheckedItemPositions();
    int i = localSparseBooleanArray.size();
    HtcListView localHtcListView = this.mListView;
    for (int j = 0; j < i; j++)
    {
      if (!localSparseBooleanArray.valueAt(j))
        continue;
      localHtcListView.setItemChecked(localSparseBooleanArray.keyAt(j), false);
    }
  }

  private void deleteFootprints(Footprint[] paramArrayOfFootprint)
  {
    new DeleteFootprintsThread(paramArrayOfFootprint).start();
    new Thread(new clearCachedRunnable(paramArrayOfFootprint)).start();
    FootprintManager.getInstance(this).removeFootprint(paramArrayOfFootprint);
  }

  private void doChangeCategory(int paramInt)
  {
    clearCheckState();
    this.mCategoryKeyword = ((Category)this.mCategoryList.get(paramInt)).mKeyword;
    this.mCategoryIndex = paramInt;
    updateEmptyText();
    this.mFilter.filter(this.mSearchEdit.getText());
  }

  private void doDelete()
  {
    SparseBooleanArray localSparseBooleanArray = this.mListView.getCheckedItemPositions();
    int i = localSparseBooleanArray.size();
    ListModeAdapter localListModeAdapter = this.mAdapter;
    this.mSelectedFootprints = new ArrayList();
    for (int j = 0; j < i; j++)
    {
      if (!localSparseBooleanArray.valueAt(j))
        continue;
      Footprint localFootprint = localListModeAdapter.getFootprint(localSparseBooleanArray.keyAt(j));
      this.mSelectedFootprints.add(localFootprint);
    }
    if (this.mSelectedFootprints.size() > 0)
      showDialog(2);
    while (true)
    {
      return;
      finish();
    }
  }

  private void parseIntent()
  {
    Intent localIntent = getIntent();
    this.mSortMode = localIntent.getIntExtra("EXTRA_SORT_MODE", 1);
    if (this.mSortMode == 1);
    for (this.mSortString = "create_time desc"; ; this.mSortString = "name asc")
    {
      this.mCategoryKeyword = localIntent.getStringExtra("EXTRA_CATEGORY");
      if (this.mCategoryKeyword == null)
        this.mCategoryKeyword = Category.getAllCategory().mKeyword;
      this.mCacheTag = localIntent.getStringExtra("EXTRA_CACHE_TAG");
      if (this.mCacheTag == null)
        this.mCacheTag = "ListModeActivity";
      return;
    }
  }

  private void setViews()
  {
    this.mListView = ((HtcListView)findViewById(16908298));
    this.mEmptyView = findViewById(16908292);
    this.mEmptyText = ((TextView)findViewById(2131492894));
    this.mDoneButton = ((Button)findViewById(2131492896));
    this.mCancelButton = ((Button)findViewById(2131492897));
    this.mDoneButton.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramView)
      {
        DeleteFootprintsActivity.this.doDelete();
      }
    });
    this.mCancelButton.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramView)
      {
        DeleteFootprintsActivity.this.finish();
      }
    });
    this.mTitleField = findViewById(2131492892);
    this.mSearchBox = ((SearchBoxView)findViewById(2131492893));
    this.mSearchEdit = this.mSearchBox.getTextField();
    this.mSearchEdit.setHint(getString(2131361878));
    this.mSearchEdit.setInputType(112);
    EditText localEditText = this.mSearchEdit;
    InputFilter[] arrayOfInputFilter = new InputFilter[1];
    arrayOfInputFilter[0] = new InputFilter.LengthFilter(20);
    localEditText.setFilters(arrayOfInputFilter);
    this.mSearchEdit.addTextChangedListener(new TextWatcher()
    {
      public void afterTextChanged(Editable paramEditable)
      {
        DeleteFootprintsActivity.this.clearCheckState();
        DeleteFootprintsActivity.this.updateEmptyText();
        DeleteFootprintsActivity.this.mFilter.filter(DeleteFootprintsActivity.this.mSearchEdit.getText());
      }

      public void beforeTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
      {
      }

      public void onTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
      {
      }
    });
  }

  private void switchListField(int paramInt)
  {
    if (paramInt != 0)
    {
      this.mListView.setVisibility(0);
      this.mEmptyView.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mListView.setVisibility(8);
      this.mEmptyView.setVisibility(0);
    }
  }

  private void switchSearchField()
  {
    if (this.mSearchBox.getVisibility() == 0)
    {
      ImeLauncher.getInstance(this).hide(this.mSearchEdit);
      this.mTitleField.setVisibility(0);
      this.mSearchBox.setVisibility(8);
      this.mSearchEdit.setText("");
    }
    while (true)
    {
      return;
      this.mTitleField.setVisibility(8);
      this.mSearchBox.setVisibility(0);
      this.mSearchEdit.requestFocus();
      ImeLauncher.getInstance(this).show(this.mSearchEdit);
    }
  }

  private void updateEmptyText()
  {
    if (this.mSearchEdit.getText().length() > 0)
      this.mEmptyText.setText(2131361954);
    while (true)
    {
      return;
      if (this.mCategoryIndex != 0)
      {
        this.mEmptyText.setText(2131361953);
        continue;
      }
      this.mEmptyText.setText(2131361952);
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    setContentView(2130903047);
    setViews();
    parseIntent();
    this.mFootprintManager = FootprintManager.getInstance(this);
    this.mCursor = this.mFootprintManager.findFootprintCursorByCategory(this.mCategoryKeyword, this.mSortString);
    this.mAdapter = new ListModeAdapter(this, 2130903048, this.mCursor);
    this.mAdapter.updateSections();
    this.mFilter = this.mAdapter.getFilter();
    new Handler().postDelayed(new Runnable()
    {
      public void run()
      {
        DeleteFootprintsActivity.this.mListView.setAdapter(DeleteFootprintsActivity.this.mAdapter);
        DeleteFootprintsActivity.this.switchListField(DeleteFootprintsActivity.this.mCursor.getCount());
        DeleteFootprintsActivity.this.updateEmptyText();
      }
    }
    , 70L);
    this.mListView.setFastScrollEnabled(true);
    this.mListView.setChoiceMode(2);
    this.mListView.setRecyclerListener(this.mAdapter);
    ArrayList localArrayList = FootprintManager.getInstance(this).getAllCategory();
    localArrayList.add(0, Category.getAllCategory());
    int i = localArrayList.size();
    this.mCategoryNames = new String[i];
    for (int j = 0; j < i; j++)
    {
      Category localCategory = (Category)localArrayList.get(j);
      this.mCategoryNames[j] = localCategory.mName;
      if (!localCategory.mKeyword.equals(this.mCategoryKeyword))
        continue;
      this.mCategoryIndex = j;
    }
    this.mCategoryList = localArrayList;
  }

  protected Dialog onCreateDialog(int paramInt)
  {
    Object localObject = null;
    switch (paramInt)
    {
    default:
    case 1:
    case 0:
    case 2:
      while (true)
      {
        if (localObject == null)
          localObject = super.onCreateDialog(paramInt);
        return localObject;
        localObject = new HtcAlertDialog.Builder(this).setTitle(2131361890).setIcon(2130837677).setNegativeButton(2131361796, null).setSingleChoiceItems(2131165185, this.mSortMode, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            if (paramInt != DeleteFootprintsActivity.this.mSortMode)
            {
              DeleteFootprintsActivity.this.clearCheckState();
              switch (paramInt)
              {
              default:
              case 0:
              case 1:
              }
            }
            while (true)
            {
              DeleteFootprintsActivity.this.mFilter.filter(DeleteFootprintsActivity.this.mSearchEdit.getText());
              paramDialogInterface.dismiss();
              return;
              DeleteFootprintsActivity.access$402(DeleteFootprintsActivity.this, "name asc");
              DeleteFootprintsActivity.access$202(DeleteFootprintsActivity.this, 0);
              continue;
              DeleteFootprintsActivity.access$402(DeleteFootprintsActivity.this, "create_time desc");
              DeleteFootprintsActivity.access$202(DeleteFootprintsActivity.this, 1);
            }
          }
        }).create();
        continue;
        localObject = new HtcAlertDialog.Builder(this).setTitle(2131361830).setIcon(2130837677).setNegativeButton(2131361796, null).setSingleChoiceItems(this.mCategoryNames, this.mCategoryIndex, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            paramDialogInterface.dismiss();
            if (DeleteFootprintsActivity.this.mCategoryIndex != paramInt)
              DeleteFootprintsActivity.this.doChangeCategory(paramInt);
          }
        }).create();
        continue;
        localObject = new HtcAlertDialog.Builder(this).setIcon(17301543).setTitle(2131361819).setMessage(2131361821).setPositiveButton(2131361893, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            if ((DeleteFootprintsActivity.this.mSelectedFootprints != null) && (DeleteFootprintsActivity.this.mSelectedFootprints.size() > 0))
            {
              Footprint[] arrayOfFootprint = new Footprint[DeleteFootprintsActivity.this.mSelectedFootprints.size()];
              DeleteFootprintsActivity.this.mSelectedFootprints.toArray(arrayOfFootprint);
              DeleteFootprintsActivity.this.deleteFootprints(arrayOfFootprint);
            }
            paramDialogInterface.dismiss();
            DeleteFootprintsActivity.this.finish();
          }
        }).setNegativeButton(2131361796, null).create();
      }
    case 3:
    }
    if (this.mCategoryKeyword == Category.getAllCategory().mKeyword);
    for (String str = getString(2131361818); ; str = getString(2131361817))
    {
      localObject = new HtcAlertDialog.Builder(this).setTitle(getString(2131361957)).setIcon(17301543).setMessage(str).setPositiveButton(2131361893, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          Footprint[] arrayOfFootprint = DeleteFootprintsActivity.this.mAdapter.getFootprints();
          DeleteFootprintsActivity.this.deleteFootprints(arrayOfFootprint);
          paramDialogInterface.dismiss();
          DeleteFootprintsActivity.this.finish();
        }
      }).setNegativeButton(2131361796, null).create();
      break;
    }
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    paramMenu.add(0, 0, 0, getString(2131361830)).setIcon(2130837733);
    paramMenu.add(0, 1, 1, getString(2131361829)).setIcon(2130837732);
    paramMenu.add(0, 2, 2, getString(2131361846)).setIcon(2130837678);
    return true;
  }

  public void onDestroy()
  {
    super.onDestroy();
    if (this.mSelectedFootprints != null)
    {
      this.mSelectedFootprints.clear();
      this.mSelectedFootprints = null;
    }
    if (this.mCursor != null)
      this.mCursor.close();
    this.mCategoryList.clear();
    this.mCategoryList = null;
    this.mCategoryNames = null;
    this.mListView.setAdapter(null);
    this.mListView.setRecyclerListener(null);
    this.mFootprintManager = null;
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    if (paramInt == 84)
      switchSearchField();
    for (boolean bool = true; ; bool = super.onKeyDown(paramInt, paramKeyEvent))
      return bool;
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    int i = paramMenuItem.getItemId();
    if (i == 1)
      showDialog(1);
    while (true)
    {
      return true;
      if (i == 2)
      {
        if (this.mAdapter.getCount() <= 0)
          continue;
        showDialog(3);
        continue;
      }
      if (i != 0)
        continue;
      showDialog(0);
    }
  }

  protected class ListModeAdapter extends ResourceCursorAdapter
    implements HtcAbsListView.RecyclerListener, SectionIndexer
  {
    private int columnIndexDate;
    private int columnIndexName;
    private int columnIndexTime;
    private boolean firstTime = true;
    FootprintImageManager imageManager = FootprintImageManager.getInstance();
    private String lastSectionString = "";
    private int positionIndex = 0;
    private Map<Integer, Integer> sectionIndex2PositionIndex = new HashMap();
    private ArrayList<String> sectionList = new ArrayList();
    SimpleDateFormat timeFormatter = new SimpleDateFormat("MM/dd/yy");

    ListModeAdapter(Context paramInt, int paramCursor, Cursor arg4)
    {
      super(paramCursor, localCursor);
      this.columnIndexTime = localCursor.getColumnIndexOrThrow("create_time");
      this.columnIndexName = localCursor.getColumnIndexOrThrow("name");
      this.columnIndexDate = localCursor.getColumnIndexOrThrow("short_date");
    }

    private void updateSections(Cursor paramCursor)
    {
      DeleteFootprintsActivity.this.mListView.setFastScrollSectionsDirty();
      this.lastSectionString = "";
      this.positionIndex = 0;
      this.sectionList.clear();
      this.sectionIndex2PositionIndex.clear();
      this.firstTime = true;
      if (paramCursor != null)
      {
        if (DeleteFootprintsActivity.this.mSortMode == 1)
          while (paramCursor.moveToPosition(this.positionIndex))
          {
            String str4 = paramCursor.getString(this.columnIndexDate);
            if (TextUtils.isEmpty(str4))
            {
              long l = paramCursor.getLong(this.columnIndexTime);
              str4 = this.timeFormatter.format(new Date(l));
            }
            if (!str4.equals(this.lastSectionString))
            {
              this.lastSectionString = str4;
              this.sectionIndex2PositionIndex.put(Integer.valueOf(this.sectionList.size()), Integer.valueOf(this.positionIndex));
              this.sectionList.add(str4);
            }
            this.positionIndex = (1 + this.positionIndex);
          }
        if (paramCursor.moveToPosition(this.positionIndex))
        {
          String str1 = paramCursor.getString(this.columnIndexName);
          if (!TextUtils.isEmpty(str1))
          {
            if (this.firstTime)
              break label301;
            if (!str1.startsWith(this.lastSectionString))
            {
              String str3 = str1.substring(0, 1);
              this.lastSectionString = str3;
              this.sectionIndex2PositionIndex.put(Integer.valueOf(this.sectionList.size()), Integer.valueOf(this.positionIndex));
              this.sectionList.add(str3);
            }
          }
          while (true)
          {
            this.positionIndex = (1 + this.positionIndex);
            break;
            label301: this.firstTime = false;
            String str2 = str1.substring(0, 1);
            this.lastSectionString = str2;
            this.sectionIndex2PositionIndex.put(Integer.valueOf(0), Integer.valueOf(0));
            this.sectionList.add(str2);
          }
        }
      }
    }

    public void bindView(View paramView, Context paramContext, Cursor paramCursor)
    {
      DeleteFootprintsActivity.ListModeItem localListModeItem = (DeleteFootprintsActivity.ListModeItem)paramView.getTag();
      Footprint localFootprint = new Footprint();
      FootprintManager.fillDataFromCursor(localFootprint, paramCursor);
      Drawable localDrawable;
      if ((localListModeItem.photo.getWidth() == 0) || (localListModeItem.photo.getHeight() == 0))
      {
        ViewGroup.LayoutParams localLayoutParams = localListModeItem.photo.getLayoutParams();
        localDrawable = this.imageManager.getScaledFastImage(DeleteFootprintsActivity.this.mCacheTag, localFootprint.mPicPath, localLayoutParams.width, localLayoutParams.height);
        localListModeItem.photo.setImageDrawable(localDrawable);
        if (TextUtils.isEmpty(localFootprint.mShortDate))
          break label383;
        localListModeItem.time.setText(localFootprint.mShortDate);
      }
      int i;
      String str1;
      SpannableString localSpannableString2;
      while (true)
      {
        Editable localEditable = DeleteFootprintsActivity.this.mSearchEdit.getText();
        i = localEditable.length();
        str1 = localEditable.toString().toLowerCase();
        if (localFootprint.mName == null)
          break label630;
        if (i <= 0)
          break label614;
        String str4 = localFootprint.mName.toLowerCase();
        localSpannableString2 = new SpannableString(localFootprint.mName);
        if (str4.startsWith(str1))
        {
          localSpannableString2.setSpan(new ForegroundColorSpan(-1), 0, i, 33);
          localSpannableString2.setSpan(new BackgroundColorSpan(-8408808), 0, i, 33);
        }
        int k = -1;
        String str5 = " " + str1;
        while (true)
        {
          k = str4.indexOf(str5, k + 1);
          if (k <= -1)
            break;
          localSpannableString2.setSpan(new ForegroundColorSpan(-1), k + 1, 1 + (i + k), 33);
          localSpannableString2.setSpan(new BackgroundColorSpan(-8408808), k + 1, 1 + (i + k), 33);
        }
        localDrawable = this.imageManager.getScaledFastImage(DeleteFootprintsActivity.this.mCacheTag, localFootprint.mPicPath, localListModeItem.photo.getWidth(), localListModeItem.photo.getHeight());
        break;
        label383: localListModeItem.time.setText(this.timeFormatter.format(new Date(localFootprint.mCreateTime)));
      }
      localListModeItem.name.setText(localSpannableString2);
      while (true)
      {
        if (localFootprint.mAddr == null)
          break label698;
        if (i <= 0)
          break;
        String str2 = localFootprint.mAddr.toLowerCase();
        SpannableString localSpannableString1 = new SpannableString(localFootprint.mAddr);
        if (str2.startsWith(str1))
        {
          localSpannableString1.setSpan(new ForegroundColorSpan(-1), 0, i, 33);
          localSpannableString1.setSpan(new BackgroundColorSpan(-8408808), 0, i, 33);
        }
        int j = -1;
        String str3 = " " + str1;
        while (true)
        {
          j = str2.indexOf(str3, j + 1);
          if (j > -1)
          {
            localSpannableString1.setSpan(new ForegroundColorSpan(-1), j + 1, 1 + (i + j), 33);
            localSpannableString1.setSpan(new BackgroundColorSpan(-8408808), j + 1, 1 + (i + j), 33);
            continue;
            label614: localListModeItem.name.setText(localFootprint.mName);
            break;
            label630: localListModeItem.name.setText("");
            break;
          }
        }
        localListModeItem.address.setText(localSpannableString1);
        if (!DeleteFootprintsActivity.this.mListView.isItemChecked(paramCursor.getPosition()))
          break label711;
        localListModeItem.checkbox.setChecked(true);
      }
      while (true)
      {
        return;
        localListModeItem.address.setText(localFootprint.mAddr);
        break;
        label698: localListModeItem.address.setText("");
        break;
        label711: localListModeItem.checkbox.setChecked(false);
      }
    }

    public void changeCursor(Cursor paramCursor)
    {
      DeleteFootprintsActivity.this.switchListField(paramCursor.getCount());
      updateSections(paramCursor);
      super.changeCursor(paramCursor);
    }

    public Footprint getFootprint(int paramInt)
    {
      Cursor localCursor = (Cursor)getItem(paramInt);
      Footprint localFootprint1;
      if (localCursor != null)
      {
        localFootprint1 = new Footprint();
        FootprintManager.fillDataFromCursor(localFootprint1, localCursor);
      }
      for (Footprint localFootprint2 = localFootprint1; ; localFootprint2 = null)
        return localFootprint2;
    }

    public Footprint[] getFootprints()
    {
      int i = getCount();
      Footprint[] arrayOfFootprint = new Footprint[i];
      for (int j = 0; j < i; j++)
        arrayOfFootprint[j] = getFootprint(j);
      return arrayOfFootprint;
    }

    public int getPositionForSection(int paramInt)
    {
      try
      {
        int j = ((Integer)this.sectionIndex2PositionIndex.get(Integer.valueOf(paramInt))).intValue();
        i = j;
        return i;
      }
      catch (Exception localException)
      {
        while (true)
        {
          Log.e("DeleteFootprintsActivity", "getPositionForSection() error: " + paramInt);
          int i = 0;
        }
      }
    }

    public int getSectionForPosition(int paramInt)
    {
      return 0;
    }

    public Object[] getSections()
    {
      Object localObject;
      if (this.sectionList.size() > 0)
        localObject = this.sectionList.toArray();
      while (true)
      {
        return localObject;
        localObject = new String[1];
        localObject[0] = " ";
      }
    }

    public View newView(Context paramContext, Cursor paramCursor, ViewGroup paramViewGroup)
    {
      View localView = super.newView(paramContext, paramCursor, paramViewGroup);
      DeleteFootprintsActivity.ListModeItem localListModeItem = new DeleteFootprintsActivity.ListModeItem();
      localListModeItem.photo = ((ImageView)localView.findViewById(2131492899));
      localListModeItem.name = ((TextView)localView.findViewById(2131492900));
      localListModeItem.address = ((TextView)localView.findViewById(2131492901));
      localListModeItem.time = ((TextView)localView.findViewById(2131492902));
      localListModeItem.checkbox = ((CheckBox)localView.findViewById(2131492903));
      localView.setTag(localListModeItem);
      return localView;
    }

    public void onMovedToScrapHeap(View paramView)
    {
      ((DeleteFootprintsActivity.ListModeItem)paramView.getTag()).photo.setImageDrawable(null);
    }

    public Cursor runQueryOnBackgroundThread(CharSequence paramCharSequence)
    {
      if (paramCharSequence == null)
        paramCharSequence = "";
      return DeleteFootprintsActivity.this.mFootprintManager.getCursorSortBy(DeleteFootprintsActivity.this.mCategoryKeyword, paramCharSequence.toString(), DeleteFootprintsActivity.this.mSortString);
    }

    public void updateSections()
    {
      updateSections(getCursor());
    }
  }

  protected static class ListModeItem
    implements HtcListItemSeparable
  {
    TextView address;
    CheckBox checkbox;
    TextView name;
    ImageView photo;
    TextView time;

    public boolean shouldDrawOnThis()
    {
      return true;
    }

    public boolean shouldSeparate(Object paramObject)
    {
      return false;
    }
  }

  class DeleteFootprintsThread extends Thread
  {
    Footprint[] data;

    public DeleteFootprintsThread(Footprint[] arg2)
    {
      Object localObject;
      this.data = localObject;
    }

    public void run()
    {
      Footprint[] arrayOfFootprint = this.data;
      int i = arrayOfFootprint.length;
      int j = 0;
      while (true)
        if (j < i)
        {
          Footprint localFootprint = arrayOfFootprint[j];
          if (FootprintUtils.checkAudioData(localFootprint.mAudioPath))
            new File(localFootprint.mAudioPath).delete();
          if (FootprintUtils.checkPhotoData(localFootprint.mPicPath))
            new File(localFootprint.mPicPath).delete();
          try
          {
            Thread.sleep(10L);
            j++;
          }
          catch (InterruptedException localInterruptedException)
          {
            while (true)
              localInterruptedException.printStackTrace();
          }
        }
    }

    void setFootprints(Footprint[] paramArrayOfFootprint)
    {
      this.data = paramArrayOfFootprint;
    }
  }
}

/* Location:           E:\workspace\dex2java\dex-translator-0.0.9.3\HtcFootprints_dex2jar.jar
 * Qualified Name:     com.htc.android.footprints.activity.DeleteFootprintsActivity
 * JD-Core Version:    0.6.0
 */